package com.spring.nio.core;

import com.spring.nio.core.listener.HttpServerListenerRunnable;
import com.spring.nio.pool.WorkerThreadPool;

/**
 * @author: YSFY
 * @date: 2021-02-21 09:21
 * @pacage_name: com.spring.nio.core
 * @class_name: ClientStartContext
 * @description: nio-client nio客户端请求权类
 */
public class ClientStartContext {

    public static void startService() {
        // 1、启动基础服务
        BasicServer.startupBasicServer();

        // 2、启动客户端监听[ServerSocketChannel]线程,监听Http请求连接
        WorkerThreadPool.executorService.submit(new HttpServerListenerRunnable());
    }
}
